#include "CreateDocument.h"
#include "Message.h"
#include "QuinceApplication.h"
#include "SketchDocument.h"

bool
CreateDocument::receive(const Message &msg)
{
    if (msg.code() == "newdoc") {
        QuinceApp().addDocument(new SketchDocument);
        return true;
    }
    return false;
}

string
CreateDocument::listeningCodes() const
{
    return "newdoc,loaddoc";
}
